package lab02.test04;

public class Staff {
    //1、属性
     String name;
     int num;
     int salary;
     double increaSalary;

    //2、行为（方法、函数）
    public double Sum(){
        return salary+increaSalary;
    }
    //3、构造方法
    Staff(){}
    Staff(String name, int num, int salary){

        this.name = name;
        this.num = num;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }
    public void setNum(int num) {
        this.num = num;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public double getIncreaSalary() {
        return increaSalary=salary*0.2;
    }

    public void setIncreaSalary(double increaSalary) {
        this.increaSalary = increaSalary;
    }
}

